#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void func(int arr[],int size){
	for (int i = 0; i < size - 1; i++) {
		for (int j = 0; j < size - 1; j++) {
			if (arr[j] > arr[j + 1]) {
				int temp = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = temp;
			}
		}
	}
}
int main() {
	int arr[9] = { 1,4,7,2,5,8,3,6,9 };
	int size = sizeof(arr) / sizeof(arr[0]);
	func(arr,size);
	for (int i = 0; i <size; i++) {
		printf("%d ", arr[i]);
	}
	return 0;
}
